package cn.suzhang.designpatterns.strategy;

public class Context2 {
	
	private Strategy strategy;
	
	public Context2(String type) {
	    
	    switch(type) {
	    
	    case "A":
	        this.strategy=new ConcreteStrategyA();
	        break;
	    case "B":
	        this.strategy=new ConcreteStrategyB();
	        break;
	    }
		
	}
	
	public void contextInterface() {
		strategy.algorithmInterface();
	}
	
}
